package Level01;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

public class Two {
    //传入数组，进行反转
    public static <A> void reverse(ArrayList<A> arr) {
        Collections.reverse(arr);
        System.out.println(arr);
    }
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        reverse(list);
        ArrayList<Integer> objects = new ArrayList<>();
        objects.add(1);
        objects.add(2);
        objects.add(3);
        reverse(objects);
    }
}

